package it.patterns.structural.flyweight;

import java.util.Hashtable;

public class FlyweightFactory {
	private static Hashtable<String, Flyweight> data = new Hashtable<String, Flyweight>();

	public static Flyweight getFlyWeight(String key) {
		if(!data.contains(key))
			data.put(key, new ConcreteFlyweight(key));
		return data.get(key);
	}
}
